#include "CWeapon.h"

LPDIRECT3DTEXTURE9 CWeapon::_weaponImage;
CWeapon::CWeapon(int left,int top,CScreen *sc,QuadTree* q,int kind,CSound *sManager)
{
	vY=WEAPON_NORMAL_SPEED;
	lastTime=GetTickCount();
	_layer=3;
	_typeObj=1;
	_kind=kind;
	_quadTree=q;
	_pRect=new RECT();
	_pRect->left=left;
	_pRect->top=top;
	_isActive=false;
	_screen=sc;
	_hidden=-1;
	_status=0;
	_id=countObj++;
	_pSoundManager=sManager;
	switch(_kind)
	{
	case 1: //may bay 1
		_pRect->right=_pRect->left+50;
		_pRect->bottom=_pRect->top+50;
		_pSprite=new CSprites(_weaponImage, false,0,0,0,50,50,left,top,0,160);
		break;
	}
}
void CWeapon::Update(int topRect,int Style)
{
	_pSprite->Draw(topRect,0,false);
}